package com.wtwd.campus.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wtwd.campus.common.RespCodeEntity;
import com.wtwd.campus.common.RespEntity;
import com.wtwd.campus.entity.Student;
import com.wtwd.campus.entity.SysUser;
import com.wtwd.campus.entity.VoStudent;
import com.wtwd.campus.wx.entity.WxUserStudentPermission;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * @author mjy
 * @date 2021/06/11
 * @description
 */
public interface StudentService {
    Integer getStudentCountByOrgCode(String orgCode);

    RespCodeEntity checkStudent(VoStudent voStudent);

    Integer addStudent(VoStudent voStudent);

    IPage<Map<String, Object>> getStudentListByCondition(Map searchMap, Page<Student> page);

    RespCodeEntity checkUpdateStudent(VoStudent voStudent);

    Integer updateStudent(VoStudent voStudent);

    Integer deleteStudentByStudentId(Integer studentId);

    List<Map<String, Object>> getWxUserByStudentId(Integer studentId);

    RespEntity importStudent(MultipartFile file, SysUser sysUser, HttpServletResponse response);

    Integer updateStudentWxUserBindStatus(Integer bindingWechat, Integer studentId);

    Map<String, Object> getStudentByStuId(Integer stuId);

    String getImeiByStuId(Integer stuId);

    Map<String, Object> getStuNameAndClassNameByStuId(Integer stuId);

    Map<String, Object> getStuNameAndClassNameByDeviceId(Integer deviceId);

    List<String> getImeiListByStuIdList(List<Integer> stuIdList);

    List<Map<String, Object>> getStuByNameAndStuNo(String name, String stuNo);

    String getSchoolOrgCodeByStuId(Integer stuId);

    List<Map<String, Object>> getSchoolOrgCodeListByStuIdList(List<Integer> stuIdList);

    Map<String, Object> getSchoolIdAndClassIdByStuId(Integer stuId);

    Map<String, Object> getStuBindingMessByStuId(Integer stuId);

    Map<String, Object> getStuMessByStuId(Integer stuId);

    int getStudentNumberByClassId(Integer classId);

    List<Map<String, Object>> getJdzcUserByStudentId(Integer studentId);

    Boolean authJdzcStudent(Integer studentId);

    /**
     * 根据学生Id获取学生和微信用户之间的绑定关系
     *
     * @param studentId
     * @return
     */
    List<WxUserStudentPermission> getWxUserStudentPermissionByStudentId(Integer studentId);
}
